import { forwardRef, Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';

import { User } from '../entities';

import { UserService } from './user.service';
import { UserController } from './user.controller';
import { AdminUserController } from './admin-user.controller';

import { JwtTool } from '@/utils/tool';
import { AnalyticsModule } from '../analytics/analytics.module';

@Module({
  imports: [
    TypeOrmModule.forFeature([User]),
    forwardRef(() => AnalyticsModule),
  ],
  controllers: [UserController, AdminUserController],
  providers: [UserService, JwtTool],
  exports: [UserService],
})
export class UserModule {}
